package com.example.spring5demo;

import sun.misc.BASE64Encoder;

public class jiGuangPush {

    private static String URLHEAD = "https://bjapi.push.jiguang.cn/v3/device";
    private static String appKey = "3483a181aade4c57d2fc2621";
    private static String masterSecret = "ff87b596e22bf11508497219";
    private boolean production = true;

    public static void main(String[] args) {
        String key = appKey + ":" + masterSecret;
        String newKey = "MzQ4M2ExODFhYWRlNGM1N2QyZmMyNjIxJTNBZmY4N2I1OTZlMjJiZjExNTA4NDk3MjE5";
        //(new BASE64Encoder()).encodeBuffer(key.getBytes());

        String url = URLHEAD + "/v3/tags/";
        String url2 = URLHEAD+"/v3/devices/191e35f7e01678d318a";
        String response = HttpClientUtil.executeByGET(url2, newKey);
        System.out.println(response);
        //3483a181aade4c57d2fc2621:ff87b596e22bf11508497219
        // Authorization: Basic MzQ4M2ExODFhYWRlNGM1N2QyZmMyNjIxJTNBZmY4N2I1OTZlMjJiZjExNTA4NDk3MjE5
    }


}
